{include file=member.header.html}
<script>
$(function(){
	$("#refund_form").submit(function(){
		var re = /^[0-9]+.?[0-9]*$/;   //判断字符串是否为数字  
     	if (($('input[name="refund_goods_fee"]').val() !='' && !re.test($('input[name="refund_goods_fee"]').val())) || ($('input[name="refund_shipping_fee"]').val() !='' && !re.test($('input[name="refund_shipping_fee"]').val())))
    	{
        	alert("{$lang.price_error}");
        	return false;
     	}
	 
		if($('input[name="refund_goods_fee"]').val()<0 || $('input[name="refund_goods_fee"]').val()==''){
			alert('{$lang.refund_fee_ge0}');
			return false;
		} else if($('input[name="refund_goods_fee"]').val() > {$refund.goods_fee}){
			alert('{$lang.refund_fee_gt_total_fee}:{$refund.goods_fee}');
			return false;
		}
		if($('input[name="refund_shipped"]:checked').val() =='' || $('input[name="refund_shipped"]:checked').val() == undefined){
			alert('{$lang.select_refund_shipped}');
			return false;
		}
		if($('input[name="refund_shipping_fee"]').val()<0){
			alert('{$lang.refund_shipping_fee_ge0}');
			return false;
		} else if($('input[name="refund_shipping_fee"]').val() > {$refund.shipping_fee}){
			alert('{$lang.refund_shipping_fee_error}:{$refund.shipping_fee}');
			return false;
		}
		
		if($('select[name="refund_reason"]').val()==''){
			alert('{$lang.select_refund_reason}');
			return false;
		}
	});	
});
</script>
<style>
.refund_form {width:938px; padding: 20px; overflow: hidden; }
.refund_form ul { width:938px; overflow: hidden; }
.refund_form li { width:938px; overflow: hidden; float: left; padding-bottom: 10px; line-height:30px;}
.refund_form li h3 { float: left; width: 80px; color: #646665; font-weight: normal; font-size: 12px; line-height:30px; }
.refund_form li p { float: left; }
.refund_form li p span { color: #b4b4b4; padding-left: 10px; }
.refund_form .submit {width: 458px;padding: 10px 0 0 80px;}
.refund_form .submit .btn {width: 120px;height: 36px;background-color: #5BB75B;cursor: pointer;font-weight: bold;color: #fff;border: 1px solid #52A452;}
</style>
<div class="content">
    {include file=member.menu.html}
    <div id="right">
        {include file=member.curlocal.html}
        {include file=member.submenu.html}
        <div class="wrap">
            <div class="public refund_form">
                <form id="refund_form" method="post" enctype="multipart/form-data">
                    <ul>
                        <li>
                            <h3>{$lang.refund_money}</h3>
                            <p><input type="text" name="refund_goods_fee" class="text width_short" value="{$refund.refund_goods_fee}" style="background:none" /> {$lang.yuan}<span class="gray">（{$lang.more}{$refund.goods_fee|price}{$lang.yuan}，{$lang.refund_money}={$lang.actual_price_number}）</span></p>
                        </li>
                        <li>
                            <h3>{$lang.receive_cond}</h3>
                            <p>
                                <input type="radio" name="refund_shipped" value="{$lang.shipped_2}" id="shipped_2" {if $refund.refund_shipped eq $lang.shipped_2} checked="checked"{/if} /><label for="shipped_2">{$lang.shipped_2}</label>
                                <input type="radio" name="refund_shipped" value="{$lang.shipped_1}" id="shipped_1" class="ml10" {if $refund.refund_shipped eq $lang.shipped_1} checked="checked"{/if}/><label for="shipped_1">{$lang.shipped_1}</label>
                                <input type="radio" name="refund_shipped" value="{$lang.shipped_0}" id="shipped_0" class="ml10" {if $refund.refund_shipped eq $lang.shipped_0 || !$refund.refund_shipped} checked="checked"{/if}/><label for="shipped_0">{$lang.shipped_0}</label>
                            </p>
                        </li>
                        <li>
                            <h3>{$lang.refund_delivery_free}</h3>
                            <p><input type="text" name="refund_shipping_fee" class="text width_short" value="{$refund.refund_shipping_fee}" /> {$lang.yuan}<span class="gray">（{$lang.more}{$refund.shipping_fee}{$lang.yuan}，{$lang.share_freight}）</span></p>
                        </li>
                        <li>
                            <h3>{$lang.refund_reason}</h3>
                            <p>
                                <select class="text" name="refund_reason">
                                    <option value="" selected="selected">{$lang.pls_select_reason}</option>
                                    <option value="{$lang.out_of_stock}" {if $refund.refund_reason eq $lang.out_of_stock} selected="selected"{/if}>{$lang.out_of_stock}</option>
                                    <option value="{$lang.failling_time}" {if $refund.refund_reason eq $lang.failling_time} selected="selected"{/if}>{$lang.failling_time}</option>
                                    <option value="{$lang.receive_fake}" {if $refund.refund_reason eq $lang.receive_fake} selected="selected"{/if}>{$lang.receive_fake}</option>
                                    <option value="{$lang.quanlity_isse}" {if $refund.refund_reason eq $lang.quanlity_isse} selected="selected"{/if}>{$lang.quanlity_isse}</option>
                                    <option value="{$lang.goods_wrong}" {if $refund.refund_reason eq $lang.goods_wrong} selected="selected"{/if}>{$lang.goods_wrong}</option>
                                    <option value="{$lang.goods_damaged}" {if $refund.refund_reason eq $lang.goods_damaged} selected="selected"{/if}>{$lang.goods_damaged}</option>
                                    <option value="{$lang.goods_not_like}" {if $refund.refund_reason eq $lang.goods_not_like} selected="selected"{/if}>{$lang.goods_not_like}</option>
                                    <option value="{$lang.other}" {if $refund.refund_reason eq $lang.other} selected="selected"{/if}>{$lang.other}</option>
                                </select>
                            </p>
                        </li>
                        <li>
                            <h3>{$lang.refund_instruction}</h3>
                            <p>
                                <textarea name="refund_desc" class="text" cols="80" rows="5" style=" background:none;">{$refund.refund_desc}</textarea>
                            </p>
                        </li>
                    </ul>
                    <div class="submit">
                        <input class="btn" type="submit" value="{if $smarty.get.act eq 'edit'}{$lang.modify}{else}{$lang.submit}{/if}{$lang.apply}">
                    </div>
                </form>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
{include file=footer.html}
